package common;

import java.io.IOException;
import java.io.Reader;

import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;


public class BaseDao {
	protected static SqlMapClient sqlMapper;
	
	static{
		try {
			Reader reader = Resources.getResourceAsReader("../config/SqlMapConfig.xml");
			sqlMapper = SqlMapClientBuilder.buildSqlMapClient(reader);
			reader.close();
		} catch (IOException e) {
			// TODO: handle exception
			throw new RuntimeException("Something bad happend while building the sqlMapClient.");
		}
	}
}
